{extend name="base" /}
{block name="body"}
<div class="layui-body">
    <!--tab标签-->
    <div class="layui-tab layui-tab-brief">
        <ul class="layui-tab-title">
            <li class="layui-this">订单管理</li>
        </ul>
        <div class="layui-tab-content">
            <div class="layui-tab-item layui-show">

                <form class="layui-form layui-form-pane" action="{:url('admin/order/index')}" method="get">
                    <div class="layui-inline">
                        <label class="layui-form-label">订单编号</label>
                        <div class="layui-input-inline">
                            <input type="text" name="keyword" value="{$keyword}" placeholder="请输入订单编号" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-inline">
                        <select name="status">
                            <option value="all" {if condition="$status=='all'"}selected{/if}>全部</option>
                            <option value="0" {if condition="$status=='0'"}selected{/if}>待付款</option>
                            <option value="1" {if condition="$status=='1'"}selected{/if}>已付款</option>
                            <option value="2" {if condition="$status=='2'"}selected{/if}>已发货</option>
                            <option value="3" {if condition="$status=='3'"}selected{/if}>已完成</option>
                        </select>
                    </div>
                    <div class="layui-inline">
                        <button class="layui-btn">搜索</button>
                    </div>
                </form>

                <table class="layui-table">
                    <thead>
                    <tr>
                        <th style="width: 30px;">ID</th>
                        <th>订单编号</th>
                        <th>用户</th>
                        <th>商品名</th>
                        <th>商品图片</th>
                        <th>订单状态</th>
                        <th>支付方式</th>
                        <th>支付金额</th>
                        <th>添加时间</th>
                        <th>操作</th>
                    </tr>
                    </thead>
                    <tbody>
                    {foreach name="order_list" item="vo"}
                    <tr>
                        <td>{$vo.id}</td>
                        <td>{$vo.username}({$vo.mobile})</td>
                        <td>{$vo.order_number}</td>
                        <td>{$vo.name}</td>
                        <td><a href="{$img_url}{$vo.image}" target="_blank"><img src="{$img_url}{$vo.image}" width="60px" height="60px"></a></td>
                        <td>{$vo.status}</td>
                        <td>{$vo.pay_status}</td>
                        <td>{$vo.pay_money}</td>
                        <td>{$vo.add_time}</td>
                        <td>
                            <a href="{:url('admin/order/edit',['id'=>$vo['id']])}" class="layui-btn layui-btn-normal layui-btn-mini">详情</a>
                        </td>
                    </tr>
                    {/foreach}
                    </tbody>
                </table>
            </div>
        </div>
    </div>
</div>
{/block}